﻿using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Service.service;
using Service.service.impl;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Services;

namespace Service
{
    /// <summary>
    /// MouJian 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务，请取消注释以下行。 
    // [System.Web.Script.Services.ScriptService]
    public class MouJian : System.Web.Services.WebService
    {

        #region 创建对象
        IGetGhsj getGhsjImpl = new GetGhsjImpl();
        #endregion

        #region 规划设计更新
        [WebMethod(Description = @"<h3>method: update</h3>
        <p>方法描述：<strong>规划设计更新</strong></p> 
        <p>参数：<strong>json:更新的json,必须含有{'LCID':''}</strong></p>
        <p style='color:green'>成功结果：<strong>{status:200;message:'更新成功';rows:{}}</strong></p>
        <p style='color:red'>失败结果：<strong>{status:0;message:'更新失败';result:'异常信息'}</strong></p>
        <p>输出格式：<strong>json</strong></p></br>")]
        public void update(string json)
        {
            Context.Response.Charset = "utf-8";
            Context.Response.ContentEncoding = Encoding.GetEncoding("utf-8");
            Context.Response.Write(getGhsjImpl.update(json));
            Context.Response.End();
        }
        #endregion 
        #region
        [WebMethod(Description = @"<h3>method: update</h3>
        <p>方法描述：<strong>规划设计更新</strong></p> 
        <p>参数：<strong>json:更新的json,必须含有{'LCID':''}</strong></p>
        <p style='color:green'>成功结果：<strong>{status:200;message:'更新成功';rows:{}}</strong></p>
        <p style='color:red'>失败结果：<strong>{status:0;message:'更新失败';result:'异常信息'}</strong></p>
        <p>输出格式：<strong>json</strong></p></br>")]
        public void updatecard(string json)
        {
            Context.Response.Charset = "utf-8";
            Context.Response.ContentEncoding = Encoding.GetEncoding("utf-8");
            Context.Response.Write(getGhsjImpl.updatecard(json));
            Context.Response.End();
        }
        #endregion
    }
}
